home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume14 / flex / patch1 < prev    next >
Encoding:
Internet Message Format  |  1988-05-05  |  3.0 KB

  1. Subject:  v14i084:  Flex, a lex replacement, Patch1
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Vern Paxson <vern@lbl-rtsg.arpa>
  7. Posting-number: Volume 14, Issue 84
  8. Archive-name: flex/patch1
  9.  
  10. These patches fix two bugs:
  11.     "\^" not correctly matching a caret
  12.     flex scanners compiled using -f or -F can die
  13.  
  14. #! /bin/sh
  15. # This is a shell archive.  Remove anything before this line, then unpack
  16. # it by saving it into a file and typing "sh file".  To overwrite existing
  17. # files, type "sh file -c".  You can also feed this as standard input via
  18. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  19. # will see the following message at the end:
  20. #        "End of shell archive."
  21. # Contents:  patch.1 patch.2
  22. # Wrapped by rsalz@fig.bbn.com on Fri May  6 16:28:01 1988
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. if test -f 'patch.1' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'patch.1'\"
  26. else
  27. echo shar: Extracting \"'patch.1'\" \(561 characters\)
  28. sed "s/^X//" >'patch.1' <<'END_OF_FILE'
  29. Greg Lee mentioned a bug regarding "\^" not correctly matching a caret
  30. in the input.  This is due to a throw-back to the dark ages, and the
  31. fix follows.
  32. X
  33. revision 1.3 
  34. X*** scan.l      Thu May  5 14:32:53 1988
  35. X--- /tmp/da1563 Thu May  5 14:36:11 1988
  36. X***************
  37. X*** 48,54 ****
  38. X  
  39. X  SCNAME                {NAME}
  40. X  
  41. X! ESCSEQ                \\([^\n]|0[0-9]{1,3})
  42. X  
  43. X  %%
  44. X      static int bracelevel, didadef;
  45. X--- 48,54 ----
  46. X  
  47. X  SCNAME                {NAME}
  48. X  
  49. X! ESCSEQ                \\([^^\n]|"^".|0[0-9]{1,3})
  50. X  
  51. X  %%
  52. X      static int bracelevel, didadef;
  53. X
  54. END_OF_FILE
  55. if test 561 -ne `wc -c <'patch.1'`; then
  56.     echo shar: \"'patch.1'\" unpacked with wrong size!
  57. fi
  58. # end of 'patch.1'
  59. fi
  60. if test -f 'patch.2' -a "${1}" != "-c" ; then 
  61.   echo shar: Will not clobber existing file \"'patch.2'\"
  62. else
  63. echo shar: Extracting \"'patch.2'\" \(916 characters\)
  64. sed "s/^X//" >'patch.2' <<'END_OF_FILE'
  65. flex scanners compiled using -f or -F can generate bogus "NULL in input"
  66. messages (and then die).  The fix follows.
  67. X
  68. X        Vern
  69. X
  70. X*** parse.y     Thu May  5 13:36:18 1988
  71. X--- /tmp/da1569 Thu May  5 14:43:06 1988
  72. X***************
  73. X*** 27,48 ****
  74. X  
  75. X  %%
  76. X  goal            :  initlex sect1 sect1end sect2
  77. X-                       { /* add default rule */
  78. X-                       int def_rule;
  79. X- 
  80. X-                       pat = cclinit();
  81. X-                       cclnegate( pat );
  82. X- 
  83. X-                       def_rule = mkstate( -pat );
  84. X- 
  85. X-                       add_accept( def_rule, 0, 0 );
  86. X- 
  87. X-                       for ( i = 1; i <= lastsc; ++i )
  88. X-                           scset[i] = mkbranch( scset[i], def_rule );
  89. X- 
  90. X-                       fputs( "YY_DEFAULT_ACTION;\n\tYY_BREAK\n",
  91. X-                              temp_action_file );
  92. X-                       }
  93. X                ;
  94. X  
  95. X  initlex         :
  96. X--- 27,32 ----
  97. X
  98. X
  99. END_OF_FILE
  100. if test 916 -ne `wc -c <'patch.2'`; then
  101.     echo shar: \"'patch.2'\" unpacked with wrong size!
  102. fi
  103. # end of 'patch.2'
  104. fi
  105. echo shar: End of shell archive.
  106. exit 0
  107.